﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="cHead" ContentPlaceHolderID="cphHead" runat="server">
    <% this.Page.Title = (string)ViewData["PageTitle"]; %>
</asp:Content>

<asp:Content ID="cJScripts" ContentPlaceHolderID="cphJScripts" runat="server">
<script type="text/javascript">
    $(document).ready(function () {
        // Text Lenght
        var mlength = 255;
        $("#signature").keyup(function () {
            if ($(this).val().length > mlength) {
                $(this).val($(this).val().substring(0, mlength));
            }
            $('#charRest').text($(this).val().length + ' / ' + mlength);
        });
        $("#charRest").text($("#signature").val().length + ' / ' + mlength);

        // Change Display
        $("#SlFunctions").change(function () {
            (this.selectedIndex == 1 || this.selectedIndex == 2) ? $("#selectSection").fadeIn("normal") : $("#selectSection").fadeOut("normal");
        });
        ($("#SlFunctions")[0].selectedIndex == 1 || $("#SlFunctions")[0].selectedIndex == 2) ? $("#selectSection").show() : $("#selectSection").hide();

        $("a.green").click(function () {
            $(this).addClass("loading");
            $('#inscription form:eq(0)').submit();
        });

        $("a.blue").click(function () {
            $('#inscription form')[0].reset();
        });
    });
</script>
</asp:Content>

<asp:Content ID="registerContent" ContentPlaceHolderID="cphMainContent" runat="server">
    <div id="inscription">
        <%= Html.ValidationSummary(ScoutNET.Resources.Master_Form_ErrorMessage)%>

        <% using (Html.BeginForm("Inscription", "Profil", FormMethod.Post, new { enctype = "multipart/form-data" })) { %>
            <h1> <%= ScoutNET.Resources.Profil_Inscription_Title1 %> : </h1>
            
            <p>
                <label for="firstname" title="<%= ScoutNET.Resources.Profil_Inscription_Firstname %>"> <%= ScoutNET.Resources.Profil_Inscription_Firstname %> :</label>
                <%= Html.TextBox("firstname", null, new { @class = "small" })%>
            </p>
            <p>
                <label for="lastname" title="<%= ScoutNET.Resources.Profil_Inscription_Lastname %>"> <%= ScoutNET.Resources.Profil_Inscription_Lastname %> :</label>
                <%= Html.TextBox("lastname", null, new { @class = "small" })%>
            </p>
            <p>
                <label for="username" title="<%= ScoutNET.Resources.Profil_Inscription_UserName %>"> <%= ScoutNET.Resources.Profil_Inscription_UserName %> :</label>
                <%= Html.TextBox("username", null, new { @class = "small" })%>
            </p>
            <p>
                <label for="email" title="<%= ScoutNET.Resources.Profil_Inscription_Email %>"> <%= ScoutNET.Resources.Profil_Inscription_Email %> :</label>
                <%= Html.TextBox("email", null, new { @class = "small" })%>
            </p>
            <p>
                <label for="password" title="<%= ScoutNET.Resources.Profil_Inscription_Password %>"> <%= ScoutNET.Resources.Profil_Inscription_Password %> :</label>
                <%= Html.Password("password", null, new { @class = "small" })%>
            </p>
            <p>
                <label for="confirmPassword" title="<%= ScoutNET.Resources.Profil_Inscription_ConfirmPassword %>"> <%= ScoutNET.Resources.Profil_Inscription_ConfirmPassword %> :</label>
                <%= Html.Password("confirmPassword", null, new { @class = "small" })%>
            </p>

		    <div class="hr1">&nbsp;</div> 
		    <h1> <%= ScoutNET.Resources.Profil_Inscription_Title2 %> : </h1>
            <p><strong> <%= ScoutNET.Resources.Profil_Inscription_Subtitle1 %></strong></p>
            <% foreach (tSite_Section item in (List<tSite_Section>)ViewData["lSections"]){ %>
                <div class="blockINscription">
                    <p>
                        <label for="section<%= item.ID %>"><%= item.Section %> : </label>
                        <input type="checkbox" id="section<%= item.ID %>" name="infoSection" value="<%= item.ID %>" />
                    </p>
                </div>
            <% } %>	
            <div class="clr"></div>
            
            <p><strong> <%= ScoutNET.Resources.Profil_Inscription_Subtitle2 %></strong></p>
		    <p>
			    <label for="SlSection"> <%= ScoutNET.Resources.Profil_Inscription_SlFunctions %> :</label>
			    <%= Html.DropDownList("SlFunctions")%>
		    </p>
    		
		    <p id="selectSection" class="display">
			    <label for="SlSection"> <%= ScoutNET.Resources.Profil_Inscription_SlSection %> :</label>
			    <%= Html.DropDownList("SlSection")%>
		    </p>
    		
		    <div class="hr1">&nbsp;</div> 
    		
		    <h1> <%= ScoutNET.Resources.Profil_Inscription_Title3 %> : </h1>
    		
		    <p>
		        <label for="sex" title="<%= ScoutNET.Resources.Profil_Inscription_Sex %>"> <%= ScoutNET.Resources.Profil_Inscription_Sex %> :</label>
		         <%= ScoutNET.Resources.Profil_Inscription_SexF %> : <%= Html.RadioButton("sex", "F", true)%>
		         <%= ScoutNET.Resources.Profil_Inscription_SexM %> : <%= Html.RadioButton("sex", "M")%>
            </p>
            <p>
                <label for="totem" title="<%= ScoutNET.Resources.Profil_Inscription_Totem %>"> <%= ScoutNET.Resources.Profil_Inscription_Totem %> :</label>
                <%= Html.TextBox("totem", null, new { @class = "small" })%>
            </p>
            <p>
                <label for="avatar" title="<%= ScoutNET.Resources.Profil_Inscription_Avatar %>"> <%= ScoutNET.Resources.Profil_Inscription_Avatar %> :</label>
                <%= Html.FileUpload("avatar")%>
                <%= Html.ValidationMessage("avatar")%>
            </p>
            <p>
                <label for="location" title="<%= ScoutNET.Resources.Profil_Inscription_Location %>"> <%= ScoutNET.Resources.Profil_Inscription_Location %> :</label>
                <%= Html.TextBox("location", null, new { @class = "small" })%>
            </p>
            <p>
                <label for="phone" title="<%= ScoutNET.Resources.Profil_Inscription_Phone %>"> <%= ScoutNET.Resources.Profil_Inscription_Phone %> * :</label>
                <%= Html.TextBox("phone", null, new { @class = "little", maxlength = "13" })%>
                 <%= ScoutNET.Resources.Profil_Inscription_Com_Phone %>
                <%= Html.ValidationMessage("phone")%>
            </p>
            
            <p>
                <label for="webSite" title=" <%= ScoutNET.Resources.Profil_Inscription_WebSite %>"> <%= ScoutNET.Resources.Profil_Inscription_WebSite %> :</label>
                <%= Html.TextBox("webSite", null, new { @class = "small", })%>
                <%= ScoutNET.Resources.Profil_Inscription_Com_WebSite %>
                <%= Html.ValidationMessage("webSite")%>
            </p>
            
            <p>
                <label for="signature" title="<%= ScoutNET.Resources.Profil_Inscription_Signature %>"> <%= ScoutNET.Resources.Profil_Inscription_Signature %> :<br /><span id="charRest">0 / 255</span></label>
                <%= Html.TextArea("signature", null, new { @class = "textAreaSmall", cols = "30", rows = "5", maxlength = "255"})%>
            </p>

            <div class="hr1">&nbsp;</div>
		    <h1> <%= ScoutNET.Resources.Profil_Inscription_Title4 %> : </h1>
		    <p><strong> <%= ScoutNET.Resources.Profil_Inscription_Subtitle3 %></strong></p>
		    <p>
                <label for="friendMail1"> <%= ScoutNET.Resources.Profil_Inscription_FriendMail %> :</label>
                <%= Html.TextBox("friendMail1", null, new { @class = "small", id = "friendMail1" })%>
              
            </p>
            <p>
                <label for="friendMail2"> <%= ScoutNET.Resources.Profil_Inscription_FriendMail %> :</label>
                <%= Html.TextBox("friendMail2", null, new { @class = "small", id = "friendMail2" })%>
                
            </p>
            <p>
                <label for="friendMail3"> <%= ScoutNET.Resources.Profil_Inscription_FriendMail %> :</label>
                <%= Html.TextBox("friendMail3", null, new { @class = "small", id = "friendMail3" })%>
                
            </p>
            <%= Html.AntiForgeryToken() %>
            <label class="recaptcha" for="recaptcha_response_field"><%= ScoutNET.Resources.Contact_Index_Captcha %> : </label>
            <%= Html.GenerateCaptcha(HttpContext.Current) %>

            <div class="blockButton">
        	    <a class="mediumBtn green awesome" href="javascript:void(0);" title="<%= ScoutNET.Resources.Master_Button_Submit %>"><%= ScoutNET.Resources.Master_Button_Submit %></a>
                <a class="mediumBtn blue awesome" href="javascript:void(0);" title="<%= ScoutNET.Resources.Master_Button_Reset %>"><%= ScoutNET.Resources.Master_Button_Reset %></a>
            </div>

        <% } %>
    </div>
</asp:Content>
